//
//  ParkingInfoViewController.m
//  NiuNiuPacking
//
//  Created by shaoting on 14-9-12.
//  Copyright (c) 2014年 Reseek. All rights reserved.
//

#import "ParkingInfoViewController.h"
#import "MyOrderDetailViewController.h"
#import "QREncoder.h"
#import "StopCarRouteViewController.h"
#import "QRCodeImageShowViewController.h"
#import "EvaluationOrderViewController.h"

@interface ParkingInfoViewController ()

@end

@implementation ParkingInfoViewController

@synthesize parkingName;

//@synthesize passDelegate;

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.lblParkingName.text=parkingName;
    self.lblParkingAddress.text  =parkingName;
}


-(void) passParameterToView:(NSString *) value{
    self.parkingName = value;
    if(self.parkingName!=nil){
        self.lblParkingName.text = value;
    }
    if(self.parkingName!=nil){
        self.lblParkingAddress.text = value;
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

- (void)dealloc {
   // [_lblParkingName release];
   // [_lblParkingAddress release];
   // [_lblPrice release];
   // [_btnCarNo release]；
    //[_btnIn release];
   [super dealloc];
}


- (IBAction)btnParking:(id)sender {
    
    
    UINavigationController *navigationController = (UINavigationController *)self.frostedViewController.contentViewController;
    
    MyOrderDetailViewController *myOrderDetailViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"myOrderDetail"];
    
    
    self.passDelegate = myOrderDetailViewController;
    
    [navigationController pushViewController:myOrderDetailViewController animated:YES];
    
    //navigationController.pushviewControllers = @[@myOrderDetailViewController];
    
    [self.passDelegate passParameterToView:@"新订单"];
}

- (IBAction)btnIn:(id)sender {
    
    UIImage *qrCodeImg = [QREncoder encode:@"www.re-seek.com"];
    QRCodeImageShowViewController *qrcodeImgShow=[self.storyboard instantiateViewControllerWithIdentifier:@"QRCodeImageShowView"];
    qrcodeImgShow.QRCodeImage = qrCodeImg;
    [self presentViewController:qrcodeImgShow animated:YES completion:^{
        //arrive new page event
    }];
    
}

- (IBAction)btnExit:(id)sender {
    
    UIImage *qrCodeImg = [QREncoder encode:@"www.re-seek.com"];
    QRCodeImageShowViewController *qrcodeImgShow=[self.storyboard instantiateViewControllerWithIdentifier:@"QRCodeImageShowView"];
    qrcodeImgShow.QRCodeImage = qrCodeImg;
    [self presentViewController:qrcodeImgShow animated:YES completion:^{
        //arrive new page event
    }];
    
}

//- (IBAction)btnCarNo:(id)sender {
//}

@end
